#ifndef MD_API_H_
#define MD_API_H_
#pragma once
#include "ThostFtdcMdApi.h"

class CtpMdSpi;

class CtpMdApi
{
public:

	CtpMdApi(CtpMdSpi *pSpi, char *pszFrontAddress);

	~CtpMdApi();

	int ReqUserLogin(TThostFtdcBrokerIDType	appId, TThostFtdcUserIDType	userId,	TThostFtdcPasswordType	passwd);
	int ReqUserLogout();
	void SubscribeMarketData(char** pInstId, int len);
	void UnSubscribeMarketData(char** pInstId, int len);

	const char* GetTradingDay();


private:
	CThostFtdcMdApi* m_pMdApi;

	TThostFtdcBrokerIDType	m_brokerId;
	TThostFtdcUserIDType	m_userId;
	int mdrequestId;  
};

#endif